home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / DLGGROUP.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.2 KB  |  56 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // DialogClass
  8. //
  9.  
  10. #include "fli.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. #include <alloc.h>
  17.  
  18. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  19. //
  20. // GroupElement()
  21. //
  22. // Add a grouped element to the linked list
  23. //
  24. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  25.  
  26. void DialogClass::GroupElement(int Group,DialogElement *Element)
  27. {
  28.   DialogClass::Element(Element);
  29.   Element->GroupCode=Group;
  30.   if (Group)
  31.     Grouped++;
  32. }
  33.  
  34. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  35. //
  36. // GroupHeading()
  37. //
  38. // Add a heading to the grouped elements
  39. //
  40. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  41.  
  42. void DialogClass::GroupHeading(int X,int Y,int Group,char *Title,int HotKey)
  43. {
  44.   HeadingStorage=(_GroupHeadings*)
  45.     realloc(HeadingStorage,sizeof(_GroupHeadings)*++HeadingCount);
  46.  
  47.   _GroupHeadings &Head=*(HeadingStorage+HeadingCount-1);
  48.  
  49.   Head.X=X;
  50.   Head.Y=Y;
  51.   Head.GroupCode=Group;
  52.   Head.Heading=Title;
  53.   Head.HotKey=HotKey;
  54. }
  55.  
  56.